﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using RN.ERP.Entity;

namespace RN.ERP.DAL
{
    public class MaterialContext : DbContext
    {
        private const string CONNECTION_STRING_NAME = "name=ZbdlryConnectionString";

        public MaterialContext()
            : base(CONNECTION_STRING_NAME)
        {
            Database.SetInitializer<MaterialContext>(null);
        }

        #region 实体操作集合

        public DbSet<MateClass> DbMateClass { get; set; }

        public DbSet<MateProperty> DbMateProperty { get; set; }

        public DbSet<Material> DbMaterial { get; set; }

        public DbSet<MInfo> DbMInfo { get; set; }

        public DbSet<MPInfo> DbMPInfo { get; set; }

        public DbSet<T_Sys_Users> DbUserInfo { get; set; }

        #endregion

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
